// SPDX-License-Identifier: GPL-2.0
/*
 * CPP: REFERENCE
 *
 * (C) 2024.05.23 BiscuitOS <buddy.zhang@aliyun.com>
 */
#include <iostream>
#include <string.h>

static void INC_FUNC(int & ref) {
	ref++;
}

int main(void)
{
	int a = 10;
	/* CREATE AN REFERENCE */
	int &p = a;

	/* USE REFERENCE DIRECT */
	p = 20;
	/* CHECK */
	std::cout << "A: " << a << std::endl;

	/* PASS REFERENCE DIRECT */
	INC_FUNC(a);
	std::cout << "B: " << a << std::endl;

	return 0;
}
